<?php
// View for admin - left menus
require_once WACT_ROOT.'controller/controller.inc.php';
require_once WACT_ROOT .'controller/form.inc.php';
require_once WACT_ROOT.'view/view.inc.php';
require_once WACT_ROOT .'view/formview.inc.php';

require_once APP_ROOT . 'view/common/layout.formview.php';
require_once APP_ROOT . 'view/common/layout.view.php';

require_once 'model/common/user.php';
require_once 'model/common/leftmenu.php';
require_once 'model/common/categories.php';
require_once 'model/common/date.php';
require_once 'model/common/article.php';
require_once 'model/common/event.php';
require_once 'model/common/league.php';
require_once 'model/common/player.php';
require_once 'model/common/team.php';
require_once 'model/common/form.php';


class InboxView extends LayoutView {

    function InboxView($TemplateFile) {
        //parent :: $IsAdminView = true;
        parent :: LayoutView($TemplateFile);
    }

    function prepare(&$controller, &$request, &$responseModel) {
    	parent::prepare($controller, $request, $responseModel);
        
		$this->Template->set('SITE_CSS',Site::getSiteTemplateCSS());
		$this->Template->set('SITE_BASE',Site::getSiteTemplateBase());
		$this->Template->set('SITE_TITLE',Site::getTitle());
 


        $number_articles = Article::getNewArticlesCount();
        if ($number_articles) $this->Template->set('number_articles', $number_articles);

        // TO DO - for the rest of entities
        $number_feedbacks = SubmissionForm::getNewFeedbacksCount();
        if ($number_feedbacks) $this->Template->set('number_feedbacks', $number_feedbacks);

        $number_leagues = League::getNewLeaguesCount();
        if ($number_leagues) $this->Template->set('number_leagues', $number_leagues);

        $number_teams = Team::getNewTeamsCount();
        if ($number_teams) $this->Template->set('number_teams', $number_teams);

        $number_players = Player::getNewPlayersCount();
        if ($number_players) $this->Template->set('number_players', $number_players);

        $number_events = Event::getNewEventsCount();
        if ($number_events) $this->Template->set('number_events', $number_events);

        return;

    }

}


?>